#! /usr/bin/env python
#coding=utf-8

#测试静态类
class TestStaticClass(object):
    @classmethod
    def CreateClass(self):
        try:
            resultClass = self.MyClass
        except:
            self.MyClass = TestStaticClass()
            resultClass = self.MyClass
        return resultClass
            
    def setA(self, a):
        self.a = a
        
    def getA(self):
        return self.a

TestStaticClass.CreateClass().setA(123)
print TestStaticClass.CreateClass().getA()


